<?php
/**
 * Created by PhpStorm.
 * User: denh
 * Date: 16/12/12
 * Time: 下午6:23
 */

class MeetingController extends BaseController {

    public $token = '';
    function __construct($m = DEFAULT_CONTROLLER, $a = DEFAULT_METHOD) {
        parent::__construct($m, $a);
        $this->redirectToWeixinForOpenid();

        $this->load_hprose();
        $this->token = $this->get_UserCenterToken($this->openId());
        $this->accout = $_SESSION['userCenter']['id'];

        logger()->logInfo("meeting_session:".var_export($_SESSION, true));

        //$this->token = "9a6ac1b368b34719b3f28a4e5ca18138721f5ebde53f47588f70cf0d4fc5a186";
        //$this->accout = "";
    }

    /**
     * 会议列表
     */
    function index() {
        require_once $this->template();
    }

    //会议列表
    function meetingList() {
        $page = $this->request('page', 0);
        $this->load_hprose();
        $re = self::$hproseHttpClient->IndexController_pageTurn($this->token, 0, $page, 4);
        echo json_encode($re);
    }

    /**
     * 会议详情页
     */
    function detail() {
        $id = $this->request('id', '', true);
        require_once $this->template();
    }

    /**
     *会议聊天室
     */
    function chat() {
        require_once $this->template();
    }

    /**
     *会议简介
     */
    function info() {
        require_once $this->template();
    }

    /**
     * 会议视频列表
     */
    function videoList() {
        require_once $this->template();
    }

    /**
     * 会议视频详情
     */
    function videoDetail() {
        require_once $this->template();
    }

}